package com.cckat.dubbo.controller;

import com.cckat.dubbo.service.HelloService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 静海基地
 */
@Controller
public class HelloController {

    @DubboReference
    private HelloService helloService;

    @RequestMapping("/hello")
    @ResponseBody
    public String sayHello(String name){
        return helloService.sayHello(name);
    }

}
